package demo2;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28779
 * Date: 2023-04-03
 * Time: 9:16
 */
public class Test {
    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        list.add(20);
        list.get()
        List<Integer> list = new ArrayList<>();
        list.add(10);
        list.clear();
        SeqList seqList = new SeqList();
        seqList.add(5);
        seqList.add(4);
        seqList.add(3);
        seqList.add(2);
        seqList.add(1);
        seqList.display();
        System.out.println();
        //System.out.println(seqList);
        seqList.add(1,6);
        seqList.display();
        System.out.println();
        //System.out.println(seqList);
        System.out.println("是否包含某个元素: " + seqList.contains(3));
        System.out.println("某个元素对应的位置: " + seqList.indexOf(10));
        System.out.println("获取 pos 位置的元素: " + seqList.get(2));
        seqList.set(1,10);
        seqList.display();
        System.out.println();
        //System.out.println(seqList);
        seqList.remove(3);
        seqList.display();
        //System.out.println(seqList);

    }
}
